package com.luyuan.crm.formula.service;

import java.io.Serializable;
import java.util.List;

import org.hibernate.criterion.Order;

import com.luyuan.crm.formula.model.Formula;
import com.luyuan.crm.product.model.ProductType;
import com.ruijie.foundation.annotation.DomainService;
import com.ruijie.foundation.query.Page;
import com.ruijie.foundation.query.criteria.CriteriaTemplate;
import com.ruijie.foundation.service.Repository;

@DomainService
public interface FormulaService extends Repository<Formula> {

    List<Formula> findByProductType(ProductType productType);

    /*
     * 分页查询
     */
    public Page pagedQuery(CriteriaTemplate criteria, int pageNo, int pageSize, List<Order> orders);

    public void deleteByFormulaId(Serializable id);

    public void batchDeleteFormula(Serializable[] ids);

    public void saveFormula(Formula formula);

    public void updateFormula(Formula formula);

    /**
     * 指设置可用
     */
    public void enableByFormulaId(Serializable id);

    /**
     * 指设置禁用
     */
    public void disableByFormulaId(Serializable id);

}
